function debounceWrapper(interval, callback,immediate) {
    let timer = null
    return function () {
        var context = this
        if(immediate)
            immediate.call(context)
        if(timer) clearTimeout(timer)
        timer = setTimeout(() => {
            timer = null
            callback.apply(this)
        }, interval)
    }
}
export default debounceWrapper